<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 刘洋
  Date: 2019/10/24
  Time: 10:44
  To change this template use File | Settings | File Templates.
--%>
<head>
	<title>个人中心</title>
	<jsp:include page="/layout/_imports.jsp"></jsp:include>
</head>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/layout/_nav.jsp"></jsp:include>

<div class="row" style="margin: 2% 10%">
	<div class="col col-sm-4" style="border: red solid 1px">
		<ul class="list-group">
			<li class="list-group-item active">个人信息</li>
			<li class="list-group-item">修改密码</li>
		</ul>
	</div>
	<div class="col col-sm-8" style="position: relative;">
		<form action="/user" method="post" enctype="multipart/form-data">
			<input type="hidden" name="state" value="updateInfo">
			<div class="form-group">
				<label for="headPath">头像上传</label>
				<img src="${empty user.headPath ? "../img/点击上传头像.jpg" : user.headPath}" alt="" id=""
				     style="width: 200px; border: red solid 1px;margin-left: 20px; ">
				<input type="file" name="uploadFile" id="headPath"
				       style="position: absolute;left: 0px;width: 200px;height: 200px;opacity: 0; cursor: pointer"/>
			</div>
			<div class="form-group">
				<label for="username">用户名:</label>
				<input type="text" class="form-control" id="username" value="${user.username}" readonly>
			</div>
			<div class="form-group">
				<label for="name">真实姓名:</label>
				<input type="text" class="form-control" id="name" name="name" value="${user.name}">
			</div>
			<div class="form-group">
				<label for="sex">性别:</label>
				<div class="input-group mb-3">
					<select class="custom-select" id="inputGroupSelect02" id="sex" name="sex">
						<option value="1" <c:if test="${user.sex == 1}">selected</c:if>>男</option>
						<option value="0" <c:if test="${user.sex == 0}">selected</c:if>>女</option>
						<option value="2" <c:if test="${user.sex == 2}">selected</c:if>>保密</option>
					</select>
				</div>
			</div>
			<input type="submit" value="确认" class="btn btn-primary"/>
			<a href="/exam/personal.jsp" class="btn btn-secondary">重置</a>
		</form>
	</div>
</div>
</body>
</html>
